//
//  PublickFunctionObject.h
//  XinLiJianKangJiaoYu
//
//  Created by 李文强 on 2018/12/4.
//  Copyright © 2018 sijiaokeji. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void (^GetDataDuccess)(id responseBody);
typedef void (^GetDataFailed)(NSString * error);

NS_ASSUME_NONNULL_BEGIN

@interface PublickFunctionObject : NSObject<NSCoding>
+(CGSize)getLabelWith:(UILabel *)label;
+(CGSize)getLabelHeight:(UILabel *)label;
+(CGSize)getStringSize:(NSString *)str andFondSize:(float)fond;
+(BOOL)isX;
//获得当前时间戳
+(NSString *)getTimeSpan:(NSString *)time_type;
+(NSString *)getTimeCurrent;
+(NSString *)timeSwitchTimestamp:(NSString *)formatTime andFormatter:(NSString *)format;
//计算键盘剩余高度
+(CGFloat)getHideHight:(CGFloat)viewH andKeyBordHight:(CGFloat)keyBordHight;
//正则手机号
+(BOOL)checkPhone:(NSString *)phone;
//月份
+ (NSString *)eduteMoth:(int)m;
//字典转接送
+(NSString *)convertToJsonData:(NSDictionary *)dict;
//支付宝支付
//+ (void)aliPayFunction:(NSDictionary *)parama;
////Wechart支付
//+ (void)weChartPayFunction:(NSDictionary *)parama;
//url请求
+ (void)postFunction:(NSDictionary *)parama andUrl:(NSString *)url andGetDataSuccess:(GetDataDuccess)success andFailed:(GetDataFailed)failed;
+ (NSMutableAttributedString *)getPriceAttribute:(NSString *)string and:(UIColor *)color andChangeBenginString:(NSString *)beginString andEndString:(NSString *)endString andSize:(int)font;
#pragma mark - 压缩图片
+ (UIImage *)zipPicture:(UIImage *)image;
+ (NSString *)getMonthBeginWith:(NSString *)dateStr;
+ (NSString *)getMonthEndWith:(NSString *)dateStr;
+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
#pragma mark - 判断当前界面是大是小
+ (CGFloat)currentScreenSize:(int)type;
#pragma mark - 通知变更界面
+ (void)changeMainView:(NSString *)noticeName AndType:(BOOL)type;
#pragma mark - 数据持久化存储-数组转换成Data
+ (void)saveArrayForData:(NSMutableArray *)array forKey:(NSString *)key;
#pragma mark - 数据持久化解码-Data转换成数组
+ (NSMutableArray *)getArrayForDataForKey:(NSString *)key;

@end

NS_ASSUME_NONNULL_END
